//
//  YeXiaoTabBarController.m
//  MyNewBase
//
//  Created by 胡超 on 16/3/9.
//  Copyright © 2016年 lbanma. All rights reserved.
//

#import "YeXiaoTabBarController.h"
#import "ShopViewController.h"
#import "OrderViewController.h"
#import "ScanViewController.h"
#import "SetViewController.h"

@interface YeXiaoTabBarController ()

@end

@implementation YeXiaoTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tabBar.translucent = NO;
    self.tabBar.tintColor = [UIColor whiteColor];
    UIImage *background = [[UIImage imageNamed:@"tabbar_selected_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeStretch];
    [self.tabBar setBackgroundImage:background];
    UIImage *backgroundSelect = [[UIImage imageNamed:@""]  resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeStretch];
    [self.tabBar setSelectionIndicatorImage:backgroundSelect];
    ShopViewController *shopVC = [[ShopViewController alloc]init];
    OrderViewController *orderVC = [[OrderViewController alloc]init];
    ScanViewController *scanVC = [[ScanViewController alloc]init];
    SetViewController *setVC = [[SetViewController alloc]init];
    
    UINavigationController *shopNavi = [[UINavigationController alloc]initWithRootViewController:shopVC];
    UINavigationController *orderNavi = [[UINavigationController alloc]initWithRootViewController:orderVC];
    UINavigationController *scanNavi = [[UINavigationController alloc]initWithRootViewController:scanVC];
    UINavigationController *setNavi = [[UINavigationController alloc]initWithRootViewController:setVC];
    self.viewControllers =  @[shopNavi,orderNavi,scanNavi,setNavi];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
